package com.zgs.mall.product.feign;

import com.zgs.common.to.SkuReductionTo;
import com.zgs.common.to.SpuBoundTo;
import com.zgs.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

//编写接口 告诉springcloud这个接口需要调用远程服务
@FeignClient("mall-coupon")
public interface CouponFeignService {

    @PostMapping("coupon/skufullreduction/savaInfo")
    public R savaInfo(@RequestBody SkuReductionTo skuReductionTo);

    @PostMapping(value = "coupon/spubounds/sava",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    R save(@RequestBody SpuBoundTo spuBoundTo);
}
